package com.situ.day11;

//类的内部
//1、Java是单继承的，如果一个类已经继承一个类，就不能再继承别的类
//2、如果一个类不继承任何一个类，默认继承Object
public class Person/* extends Object*/{
    protected int id;
    protected String name;
    protected int age;

    //构造方法重载
    public Person() {
        super();//new Object()
        System.out.println("Person.Person1");
    }

    public Person(int id, String name, int age) {
        super();//new Object()
        this.id = id;
        this.name = name;
        this.age = age;
        System.out.println("Person.Person2");
    }

    public Person(int id, String name) {
        super();//new Object()
        this.id = id;
        this.name = name;
        System.out.println("Person.Person3");
    }

    public void show() {
        //soutm
        System.out.println("Person.show");
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
